package cn.rayland.app.yandktest;

/**
 * Created by Lei on 2/4/2016.
 */
public class Extruder {
    public double max_feedrate;
    public double steps_per_mm;
    public double motor_steps;
    public double max_acc;
    public double max_speed_change;
    public double cornerPos;
    public int dir;
    public int has_heated_build_platform;
    public Extruder(){

    }

    public Extruder(double thisMax_feedrate,double thisSteps_per_mm,double thisMotor_steps, double thisMax_acc, double thisMax_speed_change, double thisCornerPos, int thisDir, int thisHas_heated_build_platform){
        max_feedrate = thisMax_feedrate;
        steps_per_mm = thisSteps_per_mm;
        motor_steps = thisMotor_steps;
        max_acc = thisMax_acc;
        max_speed_change = thisMax_speed_change;
        cornerPos = thisCornerPos;
        dir = thisDir;
        has_heated_build_platform = thisHas_heated_build_platform;
    }

    @Override
    public String toString() {
        return "Extruder{" +
                "max_feedrate=" + max_feedrate +
                ", steps_per_mm=" + steps_per_mm +
                ", motor_steps=" + motor_steps +
                ", max_acc=" + max_acc +
                ", max_speed_change=" + max_speed_change +
                ", cornerPos=" + cornerPos +
                ", dir=" + dir +
                ", has_heated_build_platform=" + has_heated_build_platform +
                '}';
    }

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Extruder other = (Extruder) obj;
		if (Double.doubleToLongBits(cornerPos) != Double
				.doubleToLongBits(other.cornerPos))
			return false;
		if (dir != other.dir)
			return false;
		if (has_heated_build_platform != other.has_heated_build_platform)
			return false;
		if (Double.doubleToLongBits(max_acc) != Double
				.doubleToLongBits(other.max_acc))
			return false;
		if (Double.doubleToLongBits(max_feedrate) != Double
				.doubleToLongBits(other.max_feedrate))
			return false;
		if (Double.doubleToLongBits(max_speed_change) != Double
				.doubleToLongBits(other.max_speed_change))
			return false;
		if (Double.doubleToLongBits(motor_steps) != Double
				.doubleToLongBits(other.motor_steps))
			return false;
		if (Double.doubleToLongBits(steps_per_mm) != Double
				.doubleToLongBits(other.steps_per_mm))
			return false;
		return true;
	}
    
    
    
    
}
